var ww_lastTabDict = new Object;

function ww_lastTab(id) {
    var ret = ww_lastTabDict[id];
    
    if (ret == undefined) {
	return 1;
    } else {
	return ret;
    }
}

function ww_setTab(id, num) {
    var oldTab = document.getElementById(id+"_pane"+ww_lastTab(id));
    var newTab = document.getElementById(id+"_pane"+num);

    var oldTab_heading = document.getElementById(id+"_tab"+ww_lastTab(id));
    var newTab_heading = document.getElementById(id+"_tab"+num);

    oldTab.style.display = "none";
    newTab.style.display = "block";

    oldTab_heading.style.paddingBottom = "0px";
    oldTab_heading.style.fontWeight = "normal";
    
    newTab_heading.style.paddingBottom = "1px";
    newTab_heading.style.fontWeight = "bold";

    ww_lastTabDict[id] = num;
}
